﻿using System.Collections.Generic;

namespace ConnectionManager
{
    public interface IConnectionManager
    {
        /// <summary>
        /// Connect the Manager, requires connection config
        /// </summary>
        /// <returns>True if connection is sucesfull</returns>
        bool Connect();

        /// <summary>
        /// Disconect the Manager
        /// </summary>
        /// <returns>True if the disconnect is sucesfull</returns>
        bool Disconnect();

        /// <summary>
        /// Load the data object that will processed and send
        /// </summary>
        /// <returns>This method loads a data object that will be sent to the console</returns>
        void SendData();

        /// <summary>
        /// Only serial connection managers will implement this method
        /// TODO this should probably be abstracted as a Connection Manager Status struct or something
        /// </summary>
        /// <returns>Returns an list containing the names of the serial ports</returns>
        List<string> GetSerialPorts();

        /// <summary>
        /// Method to pause sending data
        /// </summary>
        /// <returns>Return true if sucesfully paused the data sent to the controller</returns>
        void StopDataSend();
        
        /// <summary>
        /// Checks if the Manager is connected
        /// </summary>
        /// <returns>True if the manager is connected</returns>
        bool IsConnected();
    }
}
